/** @type {import('next').NextConfig} */
const nextConfig = {
  // output: "export", 打包出静态文件，不注释的话，打包出的静态网页无法访问
  distDir: 'out',
  productionBrowserSourceMaps: false, // Disable source maps in production
  pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
  experimental: {
    // appDir: true,  // Uncomment if using app directory structure
  },
  eslint: {
    // Ignore ESLint errors during builds (not recommended for production)
    ignoreDuringBuilds: process.env.NODE_ENV !== 'production',
  },
  typescript: {
    // Ignore TypeScript errors during builds (not recommended for production)
    ignoreBuildErrors: process.env.NODE_ENV !== 'production',
  },
  images: {
    unoptimized: true,  // Keep true for static export
  }
}

module.exports = nextConfig
